<?php
$viewdefs ['Tasks'] = 
array (
  'DetailView' => 
  array (
    'templateMeta' => 
    array (
      'form' => 
      array (
        'buttons' => 
        array (
          0 => 'EDIT',
          1 => 'DUPLICATE',
          2 => 'DELETE',
          3 => 
          array (
            'customCode' => '{if $fields.status.value == "In Progress"} <input type="hidden" name="isSave" value="false">  <input type="hidden" name="complete" value="false">  <input title="{$APP.LBL_COMPLETE_BUTTON_TITLE}"  accesskey="{$APP.LBL_COMPLETE_BUTTON_KEY}"  class="button"  onclick="if((!\'{$fields.type.value}\'.match(RegExp(\'FishTestReceived|ReviewFishTest|SecondTestReceived|Review2ndTest|ContractedFreelanceEditorAgreement|ConfidentialityAgreement|MiniCV|EditEditorCV|QCEditorCV|ChineseCVTranslation|JapaneseCVTranslation\')) || \'{$fields.type.value}\' == \'UploadEnglishandJapaneseMiniCV\' || \'{$fields.type.value}\' == \'UploadChineseMiniCV\' || confirm(\'{$MOD.CONFIRM_COMPLETE}\'))){literal}{{/literal}this.form.complete.value=true; this.form.action.value=\'Save\';this.form.return_module.value=\'Tasks\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'{literal}}{/literal} else return false;"  name="button1"  value="{$APP.LBL_COMPLETE_BUTTON_TITLE}"  type="submit">{/if}',
          ),
          4 => 
          array (
            'customCode' => '{if $fields.status.value == "Not Started"} <input type="hidden" name="isSave" value="false"> <input type="hidden" name="getstarted" value="false"> <input title="{$MOD.LBL_START_TASK_BUTTON_TITLE}"  class="button"  onclick="this.form.getstarted.value=true; this.form.action.value=\'Save\';this.form.return_module.value=\'Tasks\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'"  name="button1"  value="{$MOD.LBL_START_TASK_BUTTON_TITLE}"  type="submit">{/if}',
          ),
          5 => 
          array (
            'customCode' => '{if $fields.status.value == "In Progress" and ($fields.type.value == "Reassignment" or $fields.type.value == "Assignment")} <input type="hidden" name="isSave" value="false"> <input type="hidden" name="button click" value="assign_view"> <input title="{$MOD.LBL_ASSIGN_BUTTON_TITLE}" class="button"  onclick="this.form.return_module.value=\'Tasks\'; disableOnUnloadEditView(this.form);this.form.return_id.value=\'{$fields.id.value}\';this.form.action.value=\'Editview\'"  name="button1"  value="{$MOD.LBL_ASSIGN_BUTTON_TITLE}"  type="submit"> {/if}',
          ),
           6 => 
          array (
            'customCode' => '{if $fields.isAssignmentNeededTask.value == "true" and $fields.status.value == "Not Started"} <input type="hidden" name="button click" value="accept"><input title="{$MOD.LBL_ACCEPT_BUTTON_TITLE}" class="button"  onclick="this.form.return_module.value=\'Tasks\'; disableOnUnloadEditView(this.form); this.form.return_id.value=\'{$fields.id.value}\';this.form.action.value=\'Accept\'"  name="button1"  value="{$MOD.LBL_ACCEPT_BUTTON_TITLE}"  type="submit"> {/if}',
          ),
           7 => 
          array (
            'customCode' => '{if $fields.isAssignmentNeededTask.value == "true" and $fields.status.value == "Not Started"} <input type="hidden" name="button click" value="decline_view"><input title="{$MOD.LBL_DECLINE_BUTTON_TITLE}" class="button"  onclick="this.form.return_module.value=\'Tasks\'; disableOnUnloadEditView(this.form); this.form.return_id.value=\'{$fields.id.value}\';this.form.action.value=\'Editview\'"  name="button1"  value="{$MOD.LBL_DECLINE_BUTTON_TITLE}"  type="submit"> {/if}',
          ),
           8 => 
          array (
            'customCode' => '{if $fields.status.value == "In Progress"} <input type="hidden" name="button click" value="fastfail_view"><input title="{$MOD.LBL_FASTFAIL_BUTTON_TITLE}" class="button"  onclick="this.form.return_module.value=\'Tasks\'; disableOnUnloadEditView(this.form);this.form.return_id.value=\'{$fields.id.value}\';this.form.action.value=\'Editview\'"  name="button1"  value="{$MOD.LBL_FASTFAIL_BUTTON_TITLE}"  type="submit"> {/if}',
          ),
           9 => 
          array (
			'customCode' => '{if $fields.status.value == "In Progress"} <input type="hidden" name="button click" value="clarificationneeded"><input title="{$MOD.LBL_CLARIFICATIONNEED_BUTTON_TITLE}" class="button"  onclick="this.form.return_module.value=\'Tasks\'; disableOnUnloadEditView(this.form); this.form.return_id.value=\'{$fields.id.value}\';this.form.action.value=\'Clarificationneeded\'"  name="button1"  value="{$MOD.LBL_CLARIFICATIONNEED_BUTTON_TITLE}"  type="submit"> {/if}',
          ),
        ),
      ),
      'maxColumns' => '2',
      'widths' => 
      array (
        0 => 
        array (
          'label' => '10',
          'field' => '30',
        ),
        1 => 
        array (
          'label' => '10',
          'field' => '30',
        ),
      ),
      'useTabs' => false,
    ),
    'panels' => 
    array (
      'lbl_task_information' => 
      array (
        0 => 
        array (
          0 => 'name',
          1 => 'status',
        ),
        1 => 
        array (
          0 => 'duration',
          1 => 'date_start',
        ),
        2 => 
        array (
          0 => 'date_due',
          1 => 'completed_date',
        ),
        3 => 
        array (
          0 => 'description',
                        'reference' => array (
                                'name' => 'reference',
                                'vname' => 'LBL_REFERENCE',
                                'displayParams' => array (
                                        'link_target' => '_blank',
                                ),
                        ),
        ),
      ),
      'LBL_PANEL_DELIVERABLE' => 
      array (
        0 => 
        array (
          0 => array(
			'name'=>'deliverable_name',
          	'customCode' => '<a href="index.php?module=edanz_Deliverables&action=DetailView&record={$fields.deliverable_id.value}">{$APP.LBL_DELIVERABLE_NAME} {$fields.deliverable_name.value}</a>',
          ),
          1 => 'deliverable_service',
        ),
        1 => 
        array (
          0 => 'deliverable_due',
          1 => 'deliverable_manuscript_pages',
        ),
      ),
      'LBL_PANEL_JOB' => 
      array (
        0 => 
        array (
          0 => array(
				'name'=>'job_name',
				'customCode' => '<a href="index.php?module=edanz_Jobs&action=DetailView&record={$fields.job_id.value}">{$APP.LBL_JOB_NAME} {$fields.job_name.value}</a>',
          ),
          1 => 'job_password',
        ),
        1 => 
        array (
          0 => 'job_speed',
        ),
      ),
      'LBL_PANEL_ASSIGNMENT' => 
      array (
        0 => 
        array (
          0 => 'assigned_user_name',
          1 => 'related_editor_full_name',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'type',
            'label' => 'LBL_TYPE',
          ),
          1 => 
          array (
            'name' => 'date_modified',
            'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
            'label' => 'LBL_DATE_MODIFIED',
          ),
        ),
      ),
    ),
  ),
);
?>
